package com.yunji.aggregate.model.vo.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunji.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.order.vo
 * @Title: TradeBean
 * @Description: 交易bean
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-04-27 17:29:44      V1.0        HuaAo       新建类
 */
@Data
public class TradeVO implements Serializable {

    @ApiModelProperty(value = "交易ID")
    @TableId(type = IdType.AUTO)
    private Long tradeId;

    @ApiModelProperty(value = "交易流水号")
    @Excel(name = "交易流水号", width = 30)
    private String tradeCode;

    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "订单流水号")
    @Excel(name = "订单流水号", width = 30)
    private String orderCode;

    @ApiModelProperty("交易模式 0-订单 1-提现 2-退款")
    private Integer tradeMode;

    @ApiModelProperty(value = "交易类型(11:商品购买;12:钱包充值;13:钱包提现;13:商品退款;21:代理费用;22:员工分成;23:产品收益;24:代理费用退款;25:员工分成退款;26:商品收益退款;)")
    @Excel(name = "交易类型", readConverterExp = "11=免费,12=钱包充值,13=钱包提现,21=代理费用,22=员工分成,23=产品收益,24:代理费用退款,25=员工分成退款,26=商品收益退款,27=经理用户分成,28=经理用户分成退款")
    private Integer tradeType;

    @Excel(name = "支付金额", width = 10)
    @ApiModelProperty("支付金额")
    private BigDecimal amount;

    @Excel(name = "账户余额", width = 10)
    @ApiModelProperty("账户余额")
    private BigDecimal accountAmount;

    @ApiModelProperty("支付类型 (0:支出;1:收入; 注: 以个人钱包支出收入判断)")
    private Integer payType;

    @ApiModelProperty("支付方式 (0:余额支付;1:微信支付;2:阿里支付;)")
    private Integer payMode;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("支付时间")
    private Date payTime;

    @ApiModelProperty("第三方支付流水号")
    private String payCode;

    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "用户名称", width = 15)
    @ApiModelProperty("用户名称")
    @Length(message = "账号名称不能超过{max}个字节", max = 15)
    private String userName;

    @ApiModelProperty("用户类型")
    private String userType;

    @ApiModelProperty("用户昵称")
    private String nickName;

    @ApiModelProperty("真实姓名")
    private String realName;

    @ApiModelProperty("用户电话")
    private String phone;

    @ApiModelProperty("openId")
    private String openId;

    @Excel(name = "分成方式", readConverterExp = "0=免费,1=比例分成,2=固定金额", width = 15)
    @ApiModelProperty("分成方式 0:免费;1:比例分成;2:固定金额;")
    private Integer scaleType;

    @Excel(name = "分成金额", width = 10)
    @ApiModelProperty("分成金额")
    private BigDecimal scaleAmount;

    @ApiModelProperty("交易状态 (1:待支付;2:已入账;3:已驳回;4:支付成功(已转账);5:支付失败;6:支付关闭;)")
    private Integer tradeStatus;

    @ApiModelProperty("申请原因")
    private String applyReason;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("申请时间")
    private Date applyTime;

    @ApiModelProperty("审核人ID")
    private Long auditor;

    @ApiModelProperty("审核人名称")
    private String auditName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("审核时间")
    private Date auditTime;

    @ApiModelProperty("审核备注")
    private String auditRemark;

    @ApiModelProperty("删除状态 (0:未删除;1:已删除;)")
    private Integer delFlag;

    @ApiModelProperty("三方请求描述信息")
    private String content;

    @ApiModelProperty("三方支付响应信息")
    private String results;

    @ApiModelProperty("交易异常信息")
    private String message;

    @ApiModelProperty("网点ID")
    private Long siteId;

    @ApiModelProperty("货柜ID")
    private Long containerId;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("商品名称")
    @Excel(name = "商品名称", width = 20)
    private String productName;

    @ApiModelProperty("商品类型")
    private Integer productType;

    @ApiModelProperty("订单状态")
    private Integer orderStatus;

    @ApiModelProperty("网点名称")
    @Excel(name = "网点名称", width = 15)
    private String siteName;

    @ApiModelProperty("销售价")
    @Excel(name = "销售价", width = 5)
    private BigDecimal salePrice;

    @ApiModelProperty("折扣价")
    @Excel(name = "折扣价", width = 5)
    private BigDecimal onSalePrice;

    @ApiModelProperty("支付金额")
    private BigDecimal actualAmount;

    @ApiModelProperty("货柜二维码")
    @Excel(name = "货柜二维码", width = 25)
    private String qrCode;

    @ApiModelProperty("货柜名称")
    @Excel(name = "货柜名称", width = 10)
    private String containerName;

    @ApiModelProperty("顾客名称")
    @Excel(name = "顾客名称", width = 10)
    private String memberName;

    @ApiModelProperty("顾客手机号")
    private String memberPhone;

    @ApiModelProperty("审核信息")
    private String remark;

    @ApiModelProperty("提现账号")
    private String account;

    @ApiModelProperty("格子号")
    @Excel(name = "格子号", width = 15)
    private Integer ordinal;


    /**
     * 创建人ID
     */
    @ApiModelProperty("创建人ID")
    private Long creator;

    /**
     * 创建人名称
     */
    @Excel(name = "创建人名称")
    @ApiModelProperty("创建人名称")
    private String createName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    /**
     * 更新人ID
     */
    @ApiModelProperty("更新人ID")
    private Long updater;

    /**
     * 更新人名称
     */
    @Excel(name = "更新人名称")
    @ApiModelProperty("更新人名称")
    private String updateName;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
}